package com.example.luge.composedemo.page

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.itemsIndexed
import androidx.compose.material.Text
import androidx.compose.material.TopAppBar
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.sp
import com.example.luge.composedemo.R
import com.example.luge.composedemo.component.MenuItem

@Composable
fun MineScreen() {
    val menus = listOf(
        MenuItem(R.mipmap.ic_launcher,"测试"),
        MenuItem(R.mipmap.ic_launcher,"测试"),
        MenuItem(R.mipmap.ic_launcher,"测试"),
        MenuItem(R.mipmap.ic_launcher,"测试"),
        MenuItem(R.mipmap.ic_launcher,"测试"),


    )


    Column{
        TopAppBar(){
            Text(text = "我的", fontSize = 19.sp, color = Color.White)
        }
        LazyColumn(){
            //头像
            item {

            }
            //menu
            itemsIndexed(menus){
                index, item ->
                if(index == 3){
                    Box(){

                    }
                }
            }
        }
    }

}
